<!-- include tpl=head title=$title -->
<header>
	<section class="bg-light border-bottom">
		<div class="container p-2">
			<div class="row">
				<div class="col">
					您好，欢迎访问{$config.title}
				</div>
				<div class="col text-end">
					<!-- php:$list = menu('topnav') -->
					<!-- loop from=$list key=$key value=$value id=$tmpid -->
					<a class="p-1" href="{$value.url}" title="{$value.title}" target="{$value.target}">{$value.title}</a>
					<span class="p-1">|</span>
					<!-- /loop -->
					<!-- if $session.user_id -->
					<a class="p-1" href="{url ctrl=usercp/}">个人中心</a>
					<span class="p-1">|</span>
					<a class="p-1" href="javascript:$.user.logout('{$session.user_name}');void(0);">退出</a>
					<!-- else -->
						<!-- if $config.login_status -->
						<a class="p-1" href="{url ctrl=login/}">登录</a>
						<!-- /if -->
						<!-- if $config.login_status && $config.register_status --><span class="p-1">|</span><!-- /if -->
						<!-- if $config.register_status -->
						<a class="p-1" href="{url ctrl=register/}">注册</a>
						<!-- /if -->
					<!-- /if -->
					<!-- php:$sitelist = phpok_sitelist(true) -->
					<!-- loop from=$sitelist key=$key value=$value id=$tmpid -->
					<!-- if $value.id != $config.id -->
					<span class="p-1">|</span>
					<a class="p-1" href="{$sys.url}?siteId={$value.id}">{$value.title}</a>
					<!-- /if -->
					<!-- /loop -->
					<!-- if $config.biz_status -->
					<span class="p-1">|</span>
					<a class="p-1" href="{url ctrl=cart func=quick/}">
						快速订单
					</a>
					<!-- /if -->
				</div>
			</div>
		</div>
	</section>
	<section>
		<div class="container p-3">
			<div class="row">
				<div class="col">
					<div class="d-flex justify-content-start">
						<div class="me-2"><a href="{$sys.url}" title="{$config.title}" class="align-middle"><img src="{$config.logo}" alt="{$config.title}" class="logo" /></a></div>
						<div class="fs-1 align-middle"><a href="{$sys.url}">{$config.title}</a></div>
					</div>
				</div>
				<div class="col"></div>
				<div class="col">
					<form action="{url ctrl=search/}" method="post" onsubmit="return top_search(this)">
					<div class="input-group">
						<input type="text" name="keywords" value="{$keywords}" id="top-keywords" class="form-control" placeholder="请输入要搜索的词" />
						<button type="submit" class="btn btn-warning">搜索</button>
					</div>
					</form>
					<div class="mt-2 text-end text-gray">
						<small>搜索关键字：</small>
						<!-- php:$list = phpok('_keywords','type=hot','psize=5','sign=1') -->
						<!-- loop from=$list key=$key value=$value id=$tmpid -->
						<a class="p-1" href="{url ctrl=search keywords=$value.title/}"><small>{$value.title}</small></a>
						<!-- /loop -->
					</div>
				</div>
			</div>
		</div>
	</section>
	<section class="bg-primary">
		<div class="container p-1">
			<ul class="nav justify-content-between">
				<!-- php:$list = menu("top") -->
				<!-- loop from=$list key=$key value=$value id=$tmpid -->
				<!-- if $value.sublist -->
				<li class="nav-item dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					<a class="nav-link dropdown-toggle" href="{$value.url}" target="{$value.target}" title="{$value.title}" role="button">{$value.title}</a>
					<div class="dropdown-menu" style="top:36px;">
						<!-- loop from=$value.sublist key=$k value=$v id=$idxx -->
						<a class="dropdown-item" href="{$v.url}" target="{$v.target}" title="{$v.title}">{$v.title}</a>
						<!-- /loop -->
					</div>
				</li>
				<!-- else -->
				<li class="nav-item{if $value.highlight} active{/if}">
					<a class="nav-link" href="{$value.url}" target="{$value.target}" title="{$value.title}">{$value.title}</a>
				</li>
				<!-- /if -->
				<!-- /loop -->
			</ul>
		</div>
	</section>
</header>
